<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::group(['namespace'=>'App\Http\Controllers'], function () {
    Route::get('/', 'ClassController@index');
    Route::group(['prefix' => '/class'], function () {
        Route::get('/', 'ClassController@index')->name('class');
        Route::get('/list', 'ClassController@getList')->name('class-list');
        Route::post('/', 'ClassController@store');
        Route::put('/', 'ClassController@update');
        Route::delete('/', 'ClassController@destroy');
    });
    Route::group(['prefix' => '/student'], function () {
        Route::get('/', 'StudentController@index')->name('student');
        Route::get('/list', 'StudentController@getList')->name('student-list');
        Route::post('/', 'StudentController@store');
        Route::put('/', 'StudentController@update');
        Route::delete('/', 'StudentController@destroy');
    });
});
